<?php
namespace Admin\Controller;
class TestController extends AdminBaseController
{
    /***
     * @privilege Admin:Test->添加:06081521253
     */
    public function add()
    {
        if (IS_POST) {
            $data = I('post.data');
            $this->_addData('Test', $data);
        } else {
            $this->_display('edit', 'Test增加');
        }
    }

    /***
     * @privilege Admin:Test->编辑:82222149297
     */
    public function edit()
    {
        if (IS_POST) {
            $data = I('post.data');
            $this->_editData('Test', $data);
        } else {
            $info = $this->_detail('Test');
            $this->assign([
                'info' => $info
            ]);
            $this->_display('edit', 'Test编辑');
        }
    }

    /***
     * @privilege Admin:Test->列表:39246685950
     */
    public function lis()
    {
        $where = 1;
        $result = $this->_list('Test', $where, 10);
        $this->assign($result);
        $this->_display('lis', 'Test列表');
    }

    /***
     * @privilege Admin:Test->删除:16337210811
     */
    public function del()
    {

        $this->_delAll('Test');
    }
    public  function uuid(){
        echo getRandString(11, 'num');
    }
}